package com.jlsoft.api;

import com.alibaba.fastjson.JSON;
import com.jlsoft.mybatis.entity.TUser;
import com.jlsoft.mybatis.mapper.TUserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * api接口对应的实现要是用alibaba的
 */
@Component(value = "UserHandleImpl")
public class UserHandleImpl implements UserHandle {
    @Autowired
    private TUserMapper userMapper;
    @Override
    public String getUserById(int id) {
        TUser user = userMapper.selectByPrimaryKey(1L);

        return JSON.toJSONString(user);
    }
}
